package com.xmut.bs.handaccount.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.xmut.bs.handaccount.GlideApp;
import com.xmut.bs.handaccount.R;
import com.zhy.adapter.recyclerview.CommonAdapter;
import com.zhy.adapter.recyclerview.base.ViewHolder;

import java.util.List;

/**
 * Author Dollkey
 * Date 2018/4/10 15:26.
 */

public class VerifyVideoAdapter extends CommonAdapter<String> {

    public VerifyVideoAdapter(Context context, List<String> datas) {
        super(context, R.layout.item_img, datas);
    }

    @Override
    protected void convert(ViewHolder holder, String s, int position) {
        ImageView coverImg = holder.getView(R.id.img);
        GlideApp.with(coverImg).load(s).placeholder(R.color.grey200).error(R.color.grey200).into(coverImg);
    }

    public void addItem(String info) {
        mDatas.add(info);
        notifyItemInserted(mDatas.size());
    }
}
